<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%--
  Created by IntelliJ IDEA.
  User: 27236
  Date: 2021/8/14
  Time: 21:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>主页</title>
  <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
  <script src="${pageContext.request.contextPath}/static/js/jquery-3.6.0.js"></script>
  <script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>


</head>
<body>
<div class="container" style="width: 400px;">
  <h1>欢迎光临${sessionScope.user.username}</h1>
  <form action="${pageContext.request.contextPath}/logout" method="post">
    <security:csrfInput/>
    <button type="submit" class="btn btn-default">注销登录</button>
  </form>
  <ul class="nav nav-tabs">
    <li role="presentation" class="active"><a href="#">Home</a></li>
    <li role="presentation"><a href="${pageContext.request.contextPath}/Teacher/exam">考试系统</a>
    </li>
    <li role="presentation"><a href="${pageContext.request.contextPath}/Examine/getQuestion">添加试卷</a></li>
    <li role="presentation"><a href="${pageContext.request.contextPath}/Teacher/class">班级考试</a></li>
  </ul>
  <div class="form-group">
    <a href="${pageContext.request.contextPath}/Test/downloadTemplate">获取试题模板</a>
    <form action="${pageContext.request.contextPath}/Test/upload" enctype="multipart/form-data" method="post">
      <security:csrfInput/>
      <label for="exampleInputFile">试卷导入</label>
      <input type="file" name="file" id="exampleInputFile">
      <input class="btn btn-default btn-sm" type="submit" value="Input">
    </form>
  </div>
</div>
</body>
</html>
